<FORM method="post" action="/backend/agencystaff/save/">
<div class="form">
    <H1>{if $AgencyStaff->isNew()}Добавление нового сотрудника агенства{else}Редактирование сотрудника агенства ('{$AgencyStaff->lastname} {$AgencyStaff->firstname} {$AgencyStaff->secondname}'){/if}</H1>
    <div class="operation"><a href="{$fvConfig->get('dir_web_root')}agencystaff/" onclick="go('{$fvConfig->get('dir_web_root')}agencystaff/'); return false;" class="left">вернуться к списку</a><div style="clear: both;"></div>
<div style="width: 50%; float: left;">

    <fieldset>
        <legend>Общая информация</legend>
        <label for="lastname">Фамилия:</label> <input type="text" id="lastname" name="m_u[lastname]" value="{$AgencyStaff->lastname}"/> <br />
        <label for="firstname">Имя:</label> <input type="text" id="firstname" name="m_u[firstname]" value="{$AgencyStaff->firstname}"/> <br />
        <label for="secondname">Отчество:</label> <input type="text" id="secondname" name="m_u[secondname]" value="{$AgencyStaff->secondname}"/> <br />
        <label for="agency_id">Агенство:</label> {html_options name=m_u[agency_id] id=agency_id options=$AgencyManager->htmlSelect('name', 'Выберите агенство') selected=$AgencyStaff->agency_id}<br /> <br />
        <label for="post">Должность:</label> <input type="text" id="post" name="m_u[post]" value="{$AgencyStaff->post}"/> <br />
        <label for="education">Образование:</label> <textarea id="education" name="m_u[education]">{$AgencyStaff->education}</textarea><br />
        <label for="tourism_seniority">Стаж работы в туризме:</label> <input type="text" id="tourism_seniority" name="m_u[tourism_seniority]" value="{$AgencyStaff->tourism_seniority}"/> <br />
        <label for="birth_date">Дата рождения:</label>{html_select_date day_extra='style="width:45px"' year_extra='style="width:65px"' month_extra='style="width:100px"' field_order='DMY' start_year='-100' field_array='birth' day_value_format='%02d' time=$AgencyStaff->birth_date}
        <label for="address">Адрес:</label> <textarea id="address" name="m_u[address]">{$AgencyStaff->address}</textarea><br />
		<label for="phone_mobile">Мобильный телефон:</label> <input type="text" id="phone_mobile" name="m_u[phone_mobile]" value="{$AgencyStaff->phone_mobile}"/> <br />
        <label for="email">E-mail:</label> <input type="text" id="email" name="m_u[email]" value="{$AgencyStaff->email}"/> <br />
    </fieldset>
    <div class="buttonpanel">
        <input type="submit" name="save" value="Сохранить" class="button"  onclick="$('redirect').value = '';">
        <input type="submit" name="save_and_return" value="Сохранить и выйти" class="button" onclick="$('redirect').value = '1';">
    </div>
    <input type="hidden" name="id" id="id" value="{$AgencyStaff->getPk()}" />
    <input type="hidden" id="redirect" name="redirect" value="" />
</div>
<div style="float: left; width: 49%; margin-left: 10px;">
    <fieldset>
        <legend>Спецификация по странам</legend>
		{html_checkboxes name=m_u[countries] id=countries options=$TestModuleManager->htmlSelect('name') selected=$AgencyStaff->countries labels=true}
	</fieldset>
	<fieldset>
        <legend>Логин и пароль</legend>
        <p style="color: #922;">Логин присваивается один раз в момент его первого ввода.</p>
        <label for="login">Логин</label> <input type="text" id="login" name="m[login]" value="" {if !$AgencyStaff->isNew()}readonly="readonly"{/if}/> <br />
        {if !$AgencyStaff->isNew()}<p style="color: #922;">Оставте пароль пустым, если не хотите его изменять</p>{/if}
        <label for="password">Пароль</label> <input type="password" id="password" name="m[password]" /> <br />
        <label for="password1">Повторите пароль</label> <input type="password" id="password1" name="m[password1]" /> <br />
    </fieldset>
</div>
<div style="clear: both;" />
</div>
</FORM>